package util

import (
	"time"

	"fyne.io/fyne/v2/widget"
	"github.com/gogf/gf/v2/util/gconv"
)
// defer TimeCost(msg)
func TimeCost(msg *widget.Label) func() {
	start := time.Now()
	return func() {
		tc := time.Since(start)
		msg.SetText("time cost = " + gconv.String(tc))
	}
}
